<template>
    <section>
      <home-banner :banner-list="bannerList" style="margin-bottom: 20px;margin-top: 40px;"></home-banner>
      <home-item v-for="(item,index) in videoList" :key="index" :video-list="item" style="margin-top: 60px;"></home-item>
    </section>
</template>

<script>
    import homeBanner from "../../components/home-banner"
    import homeItem from "../../components/home-item"
    import {getHomeAllVideoList} from "../../axios/api"
    export default {
        name: "home",
        components: {
            homeBanner,
            homeItem
        },
        data(){
            return{
                bannerList:[],
                videoList:[]
            };
        },
        mounted() {
            this.getHomeAllVideoList();
        },
        methods:{
            getPageName: function (){
                return "home";
            },
            getHomeAllVideoList:async function(){
                let res = await getHomeAllVideoList();
                this.bannerList = res.msg.bannerList;
                this.videoList = res.msg.videoList;
            }
        }
    }
</script>

<style scoped>

</style>
